package com.vench.teddy.controller;

import com.vench.teddy.common.Result;
import com.vench.teddy.service.IUserService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:vench
 * @Date:2024-09-28 19:01
 */
@RestController
@RequestMapping("user")
@AllArgsConstructor
public class UserController {

    private final IUserService userService;

    @PostMapping("/batchSave")
    public Result batchSave(){
        userService.batchSaveDemos();
        return Result.success();
    }

    @PostMapping("/batchSaveByThreadPool")
    public Result batchSaveByThreadPool(){
        userService.batchSaveByThreadPool();
        return Result.success();
    }

}
